<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://shiro.apache.org/tags" prefix="shiro" %>
<html>
<head>
    <title>Title</title>
    <%@include file="/static/common/common.jsp"%>
    <script type="text/javascript" src="/static/js/department.js"></script>
</head>
<body>
<table id="dept_datagrid"></table>
<div id="tb">

    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true" data-cmd="add">新增</a>
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" data-cmd="edit">编辑</a>
    <a href="#" id="changeState_btn" class="easyui-linkbutton" data-options="iconCls:'icon-remove',plain:true" data-cmd="changeState">停用</a>
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" data-cmd="reload">刷新</a>
    <input name="keyword" class="easyui-textbox" prompt="请输入部门名或编号">
    <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search',plain:true" data-cmd="query"></a>
</div>
<div id="dept_dialog">
    <form id="dept_form" method="post">
        <input id="deptId" name="id" type="hidden">
        <table align="center" style="margin: 15px;">
            <tr>
                <td>部门名称：</td>
                <td><input type="text" name="name" class="easyui-textbox" required="true" prompt="请输入部门名"
                           invalidMessage="该部门已存在"
                           validType="remote['/department/validateName.do?id='+deptId.value,'name']"
                ></td>
            </tr>
            <tr>
                <td>部门编号：</td>
                <td><input type="text" name="sn" class="easyui-textbox"></td>
            </tr>
            <tr>
                <td>状态：</td>
                <td><input type="text" name="state" class="easyui-combobox"
                           data-options='data:[{
                                "value":"1",
                                "text":"正常"
                                },{
                                "value":"0",
                                "text":"停用"
                                }],textField:"text",
                                valueField:"value",panelHeight:"auto"'>
                    </td>
            </tr>

            <div id="btn">
                <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-save',plain:true" data-cmd="save">保存</a>
                <a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-cancel',plain:true" data-cmd="cancel">取消</a>
            </div>
        </table>
    </form>
</div>
</body>
</html>
